package multisistema.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySQL {

    private Connection conn = null;
    private String host = "localhost";
    private String db = "multisistema";
    private String user = "multisistema";
    private String pass = "desarrollo";

    public MySQL() {
        try {
            conn = DriverManager.getConnection("jdbc:mysql://"+host+"/"+db+"?"
                    + "user="+user+"&password="+pass);
        } catch (SQLException ex) {
            System.out.println("SQLException: " + ex.getMessage());
            System.out.println("SQLState: " + ex.getSQLState());
            System.out.println("VendorError: " + ex.getErrorCode());
        }
    }

    /**
     * @return the conn
     */
    public Connection getConn() {
        return conn;
    }
}
